<!DOCTYPE html>
<html lang="en">
    <head>
        {include file="public/header"}
        <link href="__public__/admin/vendor/datePicker/bootstrap-datepicker.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="__public__/admin/vendor/tinymce/tinymce.min.js"></script>
        <script type="text/javascript" src="__public__/admin/vendor/tinymce/jquery.tinymce.min.js"></script>
    </head>
    <body>
        <div class="wrapper">
            {include file="public/nav"}
            <div id="page-wrapper" style="min-height: 325px;">
                <div class="row">
	                <div class="col-lg-12">
	                    <h1 class="page-header">添加文章</h1>
	                </div>
	                <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <div class="row">
                    <form class="form" role="form" action="insert" method="post">
                        <div class="col-lg-4">
                            <div class="form-group">
                                <label>选择分类</label>
                                <select class="form-control" name="cat_id">
                                    {volist name="cat_data" id="vcat"}
                                    <option value="{$vcat.cat_id}">{$vcat.cat_name}</option>
                                    {/volist}
                                </select>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                        <div class="col-lg-6">
                            <div class="form-group">
                                <label>文章标题</label>
                                <input class="form-control" type="text" name="title" value="">
                                <p class="help-block">输入少于30个中文字体的标题</p>
                            </div>
                            <div class="form-group">
                                <label>文章副标题</label>
                                <input class="form-control" type="text" name="nick_title" value="">
                                <p class="help-block">文章副标题，少于30个字</p>
                            </div>
                            <div class="form-group">
                                <label>文章作者</label>
                                <input class="form-control" type="text" name="author" value="">
                                <p class="help-block">作者名字最多6个中文字符</p>
                            </div>
                            <div class="form-group">
                                <div class="form-group">
                                    <label>文章属性</label>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" name="art_type"  checked>一般
                                    </label>
                                    <label class="checkbox-inline" name="art_type">
                                        <input type="checkbox">头条
                                    </label>
                                </div>
                                <div class="form-group">
                                    <label>文章来源</label>
                                    <input class="form-control" type="text" name="article_source" value="localhost">
                                    <p class="help-block">可以填写网址</p>
                                </div>

                            </div>
                            <div class="form-group">
                                <label>是否审核</label>
                                <label class="radio-inline">
                                    <input type="radio" name="is_check" id="is_check" value="0" checked>是
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="is_check" id="is_check" value="1" >否
                                </label>
                            </div>
                            <div class="form-group">
                                <label>排序</label>
                                <input class="form-control" type="text" name="art_order" value="10">
                                <p class="help-block">数字越小越在前面</p>
                            </div>
                            <div class="form-group">
                                <label>选择时间</label>
                                <input id="date-picker" class="form-control" type="text" name="date" readonly="readonly" id="date">
                                <p class="help-block"></p>
                            </div>
                        </div>
                        <div class="col-lg-10">
                            <div class="form-group">
                                <label>简介内容</label>
                                <textarea name="disc" class="form-control"></textarea>
                            </div>
                        </div>
                        <div class="col-lg-12">
                            <div class="form-group">
                                <label>详细内容</label>
                                <textarea id="editor" name="content"></textarea>
                            </div>
                        </div>
                        <div class="col-lg-12">
                            <button class="btn btn-primary">确定</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        {include file="public/footer"}
        <script type="text/javascript" src="__public__/admin/vendor/datePicker/bootstrap-datepicker.js"></script>
        <script type="text/javascript" src="__public__/admin/vendor/ckeditor/sample.js"></script>
        <script type="text/javascript">
		 ;$('#date-picker').datepicker({
			 autoclose: true,
			 todayHighlight: true,
			 language:'zh-CN',
		 });
         tinymce.init({
             selector: '#editor',
             height: 500,
             menubar: false,
             plugins: [
                 'advlist autolink lists link image charmap print preview anchor textcolor',
                 'searchreplace visualblocks code fullscreen',
                 'insertdatetime media table contextmenu paste code help wordcount',
                 "codesample"
             ],
             toolbar: 'insert | undo redo |  formatselect | bold italic backcolor  | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | codesample',
             content_css: [
                 '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
                 '//www.tinymce.com/css/codepen.min.css']
         });
        </script>
    </body>
</html>
